package com.whale.cloud.util;


import com.alibaba.fastjson.JSONObject;

/**
 * 返回json {"code":"","message":""}
 */
public class DisposeRetrunUtil {
    public static JSONObject getReturnJo(String code, String message){
        JSONObject rjo = new JSONObject();
        rjo.put("code",code);
        rjo.put("message",message);
        return rjo;
    }

    public static String getReturnJostr(String code,String message){
        return getReturnJo(code,message).toString();
    }

    public static JSONObject getReturnJo(String code,String message,Object result){
        JSONObject rjo = new JSONObject();
        rjo.put("code",code);
        rjo.put("message",message);
        rjo.put("result",result);
        return rjo;
    }
}
